<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class Adv extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('adv', function (Blueprint $table) {
            $table->increments('adv_id');
            $table->mediumInteger('ap_id')->unsigned()->comment('广告位id');
            $table->string('adv_title')->comment('广告内容描述');
            $table->string('content')->comment('广告内容');
            $table->integer('adv_start_date')->comment('广告开始时间');
            $table->integer('adv_end_date')->comment('广告结束时间');
            $table->integer('slide_sort')->unsigned()->comment('幻灯片排序');
            $table->integer('member_id')->comment('会员id');
            $table->string('member_name')->comment('会员用户名');
            $table->integer('click_num')->unsigned()->comment('用户点击率');
            $table->smallInteger('is_allow')->unsigned()->comment('会员购买的广告是否通过审核0未审核1审核已通过2审核未通过');
            $table->string('buy_style')->comment('购买方式');
            $table->integer('goldpay')->unsigned()->comment('购买所支付的金币');

        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('adv');
    }
}
